package com.itheima.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.itheima.domain.db.BlackList;
import com.itheima.domain.db.UserInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

// 黑名单
public interface BlackListMapper extends BaseMapper<BlackList> {


    @Select("SELECT ui.*\n" +
            "FROM tb_black_list bl ,tb_user_info ui\n" +
            "WHERE bl.black_user_id = ui.id\n" +
            "AND bl.user_id = #{userId}")
     IPage<UserInfo> findBlackListByUid(IPage page, @Param("userId") Long userId);

}